package openjdk.jdk;

import java.io.UnsupportedEncodingException;

/**
 * Created by boot on 11/20/15.
 */
public class Base {

    public static void main(String[] args) throws UnsupportedEncodingException {
        StringBuilder sb = new StringBuilder();
        sb.append("asdfasdfasdf88中国");
        System.out.println(sb.toString());
        sb.setLength(sb.length() - 1);
        System.out.println(sb.toString());
        sb.deleteCharAt(sb.length() - 1);
        System.out.println(sb.toString());

        System.out.println("#############################");

        byte[] b = "我们的朋友".getBytes();
        String s = new String(b, "UTF-8");
        System.out.println(s);
    }
}
